package effectiveJava;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
 * Created by dycong on 2017/8/20.
 */
public class Visible {
    private static final Integer[] PRIVATE_INTEGER = {};
    /*返回一个公有的不可变列表*/
    public static final List<Integer> VALUES = Collections.unmodifiableList(Arrays.asList(PRIVATE_INTEGER));

    private static final Integer[] PRIVATE_INTEGER_2 = {};

    /*返回一个备份*/
    public static final Integer[] values() {
        return PRIVATE_INTEGER_2.clone();
    }
}
